<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>tp5.1后台注册</title>
    <link rel="shortcut icon" href="__ADMIN__/img/logo.jpg" type="image/x-icon">
    <link href="__ADMIN__/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="__ADMIN__/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="__ADMIN__/css/weather-icons.min.css" rel="stylesheet"/>
    <link href="__ADMIN__/css/beyond.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="login-container">
    <div class="loginbox bg-white">
        <form>
            <div class="loginbox-title">注册</div>
            <div class="loginbox-or">
                <div class="or-line"></div>
            </div>
            <div class="loginbox-textbox">
                <input type="text" class="form-control" name="nickname" placeholder="填写昵称"/>
            </div>
            <div class="loginbox-textbox">
                <input type="text" class="form-control" name="username" placeholder="填写用户名"/>
            </div>
            <div class="loginbox-textbox">
                <input type="password" class="form-control" name="password" autocomplete placeholder="填写密码"/>
            </div>
            <div class="loginbox-textbox">
                <input type="password" class="form-control" name="conpass" autocomplete placeholder="确认密码"/>
            </div>
            <div class="loginbox-textbox">
                <input type="email" class="form-control" name="email" placeholder="填写邮箱"/>
            </div>
            <div class="loginbox-forgot">
                <a href="">忘记密码?</a>
            </div>
            <div class="loginbox-submit">
                <input type="submit" class="btn btn-primary btn-block" id="register" value="注册">
            </div>
            <div class="loginbox-signup">
                <a href="{:url('admin/index/login')}">返回登陆</a>
            </div>
        </form>
    </div>
    <!--    <div class="logobox">-->
    <!--        <p class="text-center" style="font-size: 18px;font-weight: bold;text-shadow: 3px 3px 3px #FF0000;font-style: italic;">万动力</p>-->
    <!--    </div>-->
</div>

<script src="__ADMIN__/js/skins.min.js"></script>
<!--Basic Scripts-->
<script src="__ADMIN__/js/jquery.min.js"></script>
<script src="__ADMIN__/js/bootstrap.min.js"></script>
<script src="__ADMIN__/js/slimscroll/jquery.slimscroll.min.js"></script>
<!--Beyond Scripts-->
<script src="__ADMIN__/js/beyond.js"></script>
<script src="/static/lib/layer/layer.js"></script>
<script>
    $(window).bind("load", function () {

        /*Sets Themed Colors Based on Themes*/
        themeprimary = getThemeColorFromCss('themeprimary');
        themesecondary = getThemeColorFromCss('themesecondary');
        themethirdcolor = getThemeColorFromCss('themethirdcolor');
        themefourthcolor = getThemeColorFromCss('themefourthcolor');
        themefifthcolor = getThemeColorFromCss('themefifthcolor');

    });
    $(function () {
        $('#register').on('click', function () {
            $.ajax({
                url: '{:url("admin/index/register")}',
                type: 'post',
                data: $('form').serialize(),
                dataType: 'json',
                success: function (data) {
                    console.log(data)
                    if (data.code == 1) {
                        layer.msg('注册成功', {
                            icon: 6,
                            time: 2000
                        }, function () {
                            location.href = data.url;
                        })
                    } else {
                        layer.open({
                            content: data.msg,
                            icon: 5
                        })
                    }
                }

            })
            return false;
        })
    })
</script>
</body>
<!--  /Body -->
</html>
